import os
BASE_DIR = os.path.dirname(__file__)
private_key_path = os.path.join(BASE_DIR, 'keys/private_2048.txt')
ali_pub_key_path = os.path.join(BASE_DIR, 'keys/alipay_key_2048.txt')
APPID = '2016101600697605'
APP_PRIVATE_KEY_PATH = None
with open(private_key_path) as fp:
    APP_PRIVATE_KEY_PATH = fp.read()  # 从路径拿到应用私钥

ALIPAY_PUBLIC_KEY_PATH = None
with open(ali_pub_key_path) as fp:
    ALIPAY_PUBLIC_KEY_PATH = fp.read()  # 从路径拿到支付宝公钥
SIGN_TYPE = "RSA2"
ALIPAY_DEBUG = True
GATEWAY = None
DEBUG = True
# debug状态使用alipaydev默认为debug
GATEWAY = "https://openapi.alipaydev.com/gateway.do" if DEBUG else "https://openapi.alipay.com/gateway.do"

